/*
 * Lecture08.cpp
 *
 *  Created on: Feb 11, 2013
 *      Author: w1084063
 */


#include <iostream>
using namespace std;

int factorial(int n){
	cout << "  --> n is " << n << endl;
	if (n == 0 )
		return 1;
	int result = 0;
	result = n * factorial( n - 1 );
	return result;
}
int main(void){
	cout << "Basic Recursion" << endl;
	int N = 4;
	int sum = factorial( N );
	cout << "The factorial of " << N << " is " << sum << endl;
}

